{extend name="base" /}

{block name="title"}首页{/block}

{block name="main"}
<div class="countgo pull-left">
	<div class="zt">
		<div class="remain">
			<div class="gao1"></div>
			<div class="panel panel-default">
				<div class="panel-body">
					<div class="row">
						<frame>
							<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
							<html xmlns="http://www.w3.org/1999/xhtml">
								<head>
									<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
									<title>a</title>
									<link rel="stylesheet" type="text/css" href="/member/style.css?v=0.1"/>
									<script language="javascript" >
										var imgsrc="imsges";
										var imgt=".png";
									</script>
									<script type="text/javascript" charset="utf-8" src="/js/jquery-1.8.2.min.js"></script>
									<script type="text/javascript" charset="utf-8" src="/js/seeding.js"></script>

									<!--[if IE 6]>
									 <script language="javascript" >
									 	window.location.href="ie6.asp";
									 </script>
									<![endif]-->
								</head>
								<body id="body">
									<div id="load" style=" position:absolute; z-index:400; top:300px; width:800px; text-align:center;"><img  src="/imsges/load.gif" /></div>
									<div class="bg">
										<div class="didiv">
											{php}
												$dis = [
													'top:15px;  left:295px; ',
													'top:49px;  left:380px; ',
													'top:83px;  left:465px; ',
													'top:117px; left:550px; ',
													'top:151px; left:635px; ',
													'top:59px;  left:195px; ',
													'top:93px;  left:280px; ',
													'top:127px; left:365px; ',
													'top:161px; left:450px; ',
													'top:195px; left:535px; ',
													'top:103px; left:95px;  ',
													'top:137px; left:180px; ',
													'top:171px; left:265px; ',
													'top:205px; left:350px; ',
													'top:239px; left:435px; ',
												]
											{/php}
											<ul class="diul">
												{php}$seedingTotal=0;{/php}
												{for start="0" end="10"}
													{if condition="isset($seedings[$i+1]) AND !empty($seedings[$i+1])"}
														{php} $seedingTotal += $seedings[$i+1]['price'] + $seedings[$i+1]['profit'];{/php}
														<li class="di" id="di{$i+1}" style="{$dis[$i]}  background:url(/imsges/dibg01.png) top left no-repeat;">                                  
	                                    					<img src='/member/imsges/shu1.png' />
	                                    					<div class='diinfo'>{$seedings[$i+1]['price'] + $seedings[$i+1]['profit']}</div>
	                                  						<div class="zeng" style="display:none"></div>
														</li>
													{else/}
														<li class="di" id="di{$i+1}" style="{$dis[$i]}  background:url(/imsges/dibg00.png) top left no-repeat;">
					                                  		<div class="zeng" style="display:none"></div>
					                                	</li>
				                                	{/if}
												{/for}
												{for start="10" end="15"}
													{if condition="isset($seedings[$i+1]) AND !empty($seedings[$i+1])"}
														{php} $seedingTotal += $seedings[$i+1]['price'] + $seedings[$i+1]['profit'];{/php}
														<li class="di" id="di{$i+1}" style="{$dis[$i]}  background:url(/imsges/dibg11.png) top left no-repeat;">                                  
	                                    					<img src='/member/imsges/shu1.png' />
	                                    					<div class='diinfo'>{$seedings[$i+1]['price'] + $seedings[$i+1]['profit']}</div>
	                                  						<div class="zeng" style="display:none"></div>
														</li>
													{else/}
														<li class="di" id="di{$i+1}" style="{$dis[$i]}  background:url(/imsges/dibg10.png) top left no-repeat;">
					                                  		<div class="zeng" style="display:none"></div>
					                                	</li>
				                                	{/if}
												{/for}
											</ul>
										</div>

										<div class="info">
											&nbsp;&nbsp;<span id="unumber">用户：{$user.username}</span>
											&nbsp;&nbsp;&nbsp;&nbsp;总量：<span class="red" id="seedTotal">{$fruitFirst + $seedFirst + $seedingTotal}</span>
											&nbsp;&nbsp;果子：<span class="red" id="fruit">{$fruitFirst}</span>
											&nbsp;&nbsp;种子：<span class="red" id="seed">{$seedFirst}</span>
											&nbsp;&nbsp;播种：<span class="red" id="seedingTotal">{$seedingTotal}</span>
											<!--&nbsp;&nbsp;肥料：<span class="red" id="fei">999</span>-->
											<!--&nbsp;&nbsp;守护精灵：<span class="red" id="dog">999</span>-->
											<!--&nbsp;&nbsp;推车：<span class="red" id="dog">999</span>-->
											<!--&nbsp;&nbsp;看守房：<span class="red" id="dog">999</span>-->
										</div>
		
										<div class="tooldiv">
											<div id="kaiico"><img src="/imsges/kaiico2.png" onClick="mico('kaiico')" alt="开垦新地" /></div>
											<div id="jiaico"><img src="/imsges/jiaico2.png" onClick="mico('jiaico')" alt="增加播种" /></div>
											<div id="hfico2"><img src="/imsges/hfico2.png" alt="撒施化肥"/></div>
											<!--<div id="hfico"><img src="/imsges/hfico.png" onClick="mico('hfico')" alt="撒施化肥"/></div>-->
											<div id="caiico"><img src="/imsges/caiico.png" onClick="mico('caiico')" alt="采摘花" /></div>
		      								<div id="caimi"><img src="/imsges/mf2.png"  alt="采蜜" /></div>
											<div id="tou"><img src="/imsges/tou1.png"  alt="偷" /></div>
											<div id="sxico"><img src="/imsges/shuaxin.png" onClick="location.reload();" alt="刷新" /></div>
										</div>
										
										<!--<div id="daocaoren2"><img src="/member/imsges/daocaoren.png" border="0"></div>-->
		
										<div id="shifei" style="display:none"><img style="width:0px;" src="/imsges/huafei.png" /></div>
									</div>
		
									<div class="clear"></div>
								</body>
						</frame>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="script"}
<script type="text/javascript">
	$(document).ready(function() {
		$(".di").bind("click", function() {
			var _this = $(this);
			if(msico=="caiico" && _this.html().indexOf("diinfo")>0){
				var id = _this.attr('id');
				var sort = id.replace("di", ""); //土地的ID

				tishi2();
				$.post('/fruit/friends/getSeedingFirst', {user_id: {$Think.get.user_id}, sort: sort}, function(result) {
					tishi2close();
					layer.msg(result['message']);
				});
			}
		});
	});
</script>
{/block}